import { registerApplication, start } from "single-spa";

registerApplication({
  name: "@single-spa/welcome",
  app: () =>
    import(
      /* webpackIgnore: true */
      "https://unpkg.com/single-spa-welcome/dist/single-spa-welcome.js"
    ),
  activeWhen: location =>location.pathname == "/",
});

registerApplication({
  name: "@jun/vue",
  app: () =>
    // import(
    //   /* webpackIgnore: true */
    //   "@jun/vue"
    // ),
  System.import("@jun/vue"),
  activeWhen: ["/vue"],
});

registerApplication({
  name: "@jun/react",
  app: () =>
    // import(
    //   /* webpackIgnore: true */
    //   "@jun/vue"
    // ),
  System.import("@jun/react"),
  activeWhen: ["/react"],
});

start({
  urlRerouteOnly: true,
});
